package com.econ.powercloud.ems.service.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.econ.powercloud.ems.dal.entity.IotProductYc;
import com.econ.powercloud.ems.dal.entity.PrometheusMonitorCategory;
import com.econ.powercloud.ems.dal.entity.PrometheusMonitorItem;
import com.econ.powercloud.ems.dal.mapper.PrometheusMonitorCategoryMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class PrometheusMonitorCategoryDAO extends ServiceImpl<PrometheusMonitorCategoryMapper, PrometheusMonitorCategory> {

    public List<PrometheusMonitorCategory> findByCategory(String category){
        LambdaQueryWrapper<PrometheusMonitorCategory> lambdaQuery = Wrappers.lambdaQuery();
        lambdaQuery.eq(PrometheusMonitorCategory::getCategory,category);
        return this.baseMapper.selectList(lambdaQuery);
    }
}
